Repository navigation
chore(npm): update opentelemetry-js monorepo to v3 - #273
renovate[bot] wants to merge 1 commit into
Conversation
[High risk] The reported P1 stands: the lockfile resolves core, propagator-b3 and resources 3.1.1, which need API >=1.10.0, against API 1.9.0, while sdk-node 0.217.0 still needs API below 1.10. The release notes say this combination fails at runtime. The risk is high because these are four major steps in the shared telemetry stack used at server startup, and the 3.x release notes list many removals and Node version changes; the review's checks found no use of the removed APIs in init.ts. Not approved: confidence 3/5 is below the threshold of 4 FindingsSummaryUpdates four OpenTelemetry dependencies to SDK 3.1.1.
Review context · 4 sources · 3/5 commands · 1 overlapping pull request
Reviews (1) · Last reviewed commit: "chore(npm): update opentelemetry-js mono..." · openai/gpt-6.1-sol · $0.24 |
| '@opentelemetry/context-async-hooks': ^2.5.0 | ||
| '@opentelemetry/core': ^2.5.0 | ||
| '@opentelemetry/context-async-hooks': ^3.0.0 | ||
| '@opentelemetry/core': ^3.0.0 |
There was a problem hiding this comment.
Keep the OpenTelemetry API and SDK generations compatible · compatibility
With the committed lockfile, @common/server resolves core, propagator-b3 and resources 3.1.1 against @opentelemetry/api 1.9.0, although all three now require >=1.10.0 <1.11.0. This introduces unsatisfied peer dependencies into the telemetry stack used by packages/common/src/otel/init.ts:2–10. Simply updating the API is not sufficient: sdk-node 0.217.0 and its SDK 2.x dependencies still require API <1.10.0. The upstream 3.x migration guide explicitly requires keeping API 1.9.x with SDK 2.x or migrating the SDK together.
Suggested fix
Restore the four catalog ranges to ^2.5.0 and regenerate pnpm-lock.yaml for now, or perform a coordinated SDK 3.x migration including API >=1.10.0 and the compatible SDK-node/exporter generation and initialization changes.
Prompt for a coding agent
In pnpm-workspace.yaml, restore @opentelemetry/context-async-hooks, @opentelemetry/core, @opentelemetry/propagator-b3 and @opentelemetry/resources to ^2.5.0, then regenerate pnpm-lock.yaml so they remain compatible with the existing API 1.9.0 and SDK-node 0.217.0. Do not upgrade API alone: the retained SDK 2.x packages require API <1.10.0. Defer the four major upgrades to a coordinated SDK 3.x migration.
This PR contains the following updates:
^2.5.0→^3.0.0^2.5.0→^3.0.0^2.5.0→^3.0.0^2.5.0→^3.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
open-telemetry/opentelemetry-js (@opentelemetry/context-async-hooks)
v3.1.1Compare Source
🐛 Bug Fixes
host.id@trentmv3.1.0Compare Source
🚀 Features
envDetectorin favor of separateresourceAttributesEnvDetectorandserviceNameEnvDetector. Also markserviceInstanceIdDetectoras stable (theservice.instance.idsemconv attribute is now stable). #6999 @trentm🐛 Bug Fixes
@opentelemetry/apipeer dependency so Yarn PnP can resolve it forcontext-zone-peer-dep#7268 @Vivek1898@opentelemetry/apipeer dependency version to 1.10.0 for packages that depend on@opentelemetry/core,@opentelemetry/otlp-transformeror@opentelemetry/instrumentation, as these use API 1.10 features. (#7258) @volodymyrshk @pichlermarc@opentelemetry/api1.9.x never worked: they failed at runtime. The peer dependency now makes npm report this at install time instead.@opentelemetry/apito 1.10.0 or later.📚 Documentation
@opentelemetry/apiv1.10.0 needs SDK 3.x #7253 @adityareddy-dev🏠 Internal
v3.0.0Compare Source
💥 Breaking Changes
@opentelemetry/sdk-trace-nodepackage #7054@opentelemetry/sdk-tracepackage.See the 3.x migration guide for full migration instructions.
@opentelemetry/shim-opentracingpackageAsyncHooksContextManager#7078tsctotsdown, emitting dual CJS/ESM output from a singledist/directory and declaring anexportsmap on every package #6293 @overbalanceexportsmap.exportsmap is an allowlist that Node.js and bundlers enforce, so specifiers such as@opentelemetry/core/build/src/...or@opentelemetry/core/build/esm/...now fail withERR_PACKAGE_PATH_NOT_EXPORTED. Rewriting them to the new file layout does not help — unlisted subpaths are rejected whether or not the file exists.build/src(CJS),build/esmandbuild/esnext(ESM) intodist/, using.cjs/.mjsextensions with matching.d.cts/.d.mtsdeclarations.<package>/package.jsonis no longer importable for the same reason. Read a package's version from your own dependency metadata, or useSDK_INFOfrom@opentelemetry/corefor the SDK version.esnextentry point has been removed; tools that preferred it fall back tomodule(ESM) ormain(CJS).getTimeOrigin,otperformance,_globalThis, andunrefTimerfrom@opentelemetry/core#7053getTimeOrigin()— useperformance.timeOrigindirectly.otperformance— use the globalperformanceobject directly._globalThis— useglobalThisdirectly.unrefTimer(timer)— calltimer.unref()directly in your own code.TracerProviderOptions.forceFlushTimeoutMillis#7057timeoutMillistoprovider.forceFlush({ timeoutMillis })instead. The default timeout is 30000ms.@opentelemetry/propagator-jaegerpackage #7077W3CTraceContextPropagator. UseW3CTraceContextPropagatorfrom@opentelemetry/coreinstead.@opentelemetry/exporter-jaegerpackage@opentelemetry/sdk-trace-baseand@opentelemetry/sdk-trace-webpackages #7117@opentelemetry/sdk-tracepackage.See the 3.x migration guide for full migration instructions.
browserfield inpackage.jsonwith#platformsubpath imports #7141 @overbalancenodecondition load the Node.js build; all others load the browser build. Bundlers withoutimportssupport fail; see the migration guide.#platformfromrequire()../detectors/platformand./detectors/platform/browsersubpath exports; import from the package root #7141 @overbalance./platformand./platform/browsersubpath exports; import from the package root #7141 @overbalanceLoggerConfig.disabledwithenabledto match the specification #7160disabled: truewithenabled: false, anddisabled: falsewithenabled: true. Loggers remain enabled by default.🚀 Features
maxExportBatchSizeoption inPeriodicExportingMetricReader@opentelemetry/sdk-logsas stable #7143 @trentmdisableAutoFlushOnDocumentHidetoBatchSpanProcessorOptionsandBatchLogRecordProcessorOptions, deprecateBatchSpanProcessorBrowserOptionsandBatchLogRecordProcessorBrowserOptions#7140 @overbalance🐛 Bug Fixes
defaultexport condition instead ofimport, so a resolver that activates neitherimportnorrequirestill finds an entry point #7132 @overbalanceRandomIdGeneratorid generators prototype methods, so subclasses can override them #7190 @overbalancestartSpantowardattributeCountLimit#7176 @overbalanceglobalThis.processin the browser build #7173 @overbalancefalseinstead ofundefinedfrom the browsergetBooleanFromEnv#7188 @overbalanceundefinedproperties #7207 @trentmisAnyValue()now returns true for{aStr: 'bob', anUndefined: undefined}. This restores the behavior of the oldisLogAttributeValuefrom version 2.x of thesdk-logspackage.cleanAttributes()andmaybeAddAttribute(), will now drop undefined properties from objects. For example,logger.emit(attributes: {myAttr: {aStr: 'bob', anUndefined: undefined}, ...)will includeattributes: {myAttr: {aStr: 'bob'}}.📚 Documentation
🏠 Internal
@opentelemetry/sdk-trace-webpackage from examples and bundler tests #7095StackContextManagerin@opentelemetry/sdk-tracepackage #7086main, so a maintenance release no longer overwrites it.devEngines#7093 @overbalance^24.11.1 || >=26.0.0with npm>=11.10.0; both are advisory and warn rather than fail. The published packages are unaffected and still support Node.js>=22.15.0, which the test matrix continues to cover.modulefield frompackage.json; bundlers resolve the ESM build through theexportsmap #7130 @overbalancepack --jsonoutput, which is keyed by package name instead of an array #7133 @overbalanceprocessshim from the repo root, so browser tests run with isolated installs #7137 @overbalanceversiontarget defaults by the target name, so a cache hit restores the generatedsrc/version.ts#7134 @overbalancetest,test:browserandtest:webworkertargets compile their dependencies first, since tests load dependencies from theirdist#7139 @overbalancenode_modules, so workspace dependencies resolve and entry points load fully instead of being skipped #7138 @overbalancenpm run lint#7200 @overbalance@opentelemetry/resourcestodevDependencies, since only tests use it #7200 @overbalancepagehidelistener from the browserBatchSpanProcessor, it was registered ondocumentand never ran, andvisibilitychangealready flushes on unload #7153 @adityareddy-devpagehidelistener from the browserBatchLogRecordProcessor, it was registered ondocumentand never ran, andvisibilitychangealready flushes on unload #7153 @adityareddy-devReturnType<typeof setTimeout>instead ofNodeJS.Timeout#7174 @overbalancev2.12.1Compare Source
2.12.1
🐛 Bug Fixes
host.id@trentmv2.12.0Compare Source
2.12.0
🚀 Features
StackContextManagerin@opentelemetry/sdk-tracepackage #7086🏠 Internal
main, so a maintenance release no longer overwrites it.v2.11.0Compare Source
🚀 Features
attach()onAsyncLocalStorageContextManager#6845 @pichlermarcAsyncLocalStorage.withScope()returning a nativeRunScope. On older Node.js, falls back toenterWith()with a manual disposable wrapper.🐛 Bug Fixes
Infinityin exponential histograms #7015 @mwearTraceState.set()so a 32-member list cannot grow past the W3C limit #6964 @Zuhef🏠 Internal
service.instance.idv2.10.0Compare Source
🚀 Features
@opentelemetry/propagator-jaegerpackage will be removed in SDK 3.x, planned for approximately September 2026. @pichlermarcW3CTraceContextPropagator. This package will be removed in a future release.🐛 Bug Fixes
SimpleSpanProcessor.forceFlush()when a pending export fails #6771 @LarryHu0217TraceIdRatioBasedSampler#6890 @LarryHu0217🏠 Internal
v2.9.0Compare Source
💥 Breaking Changes
@opentelemetry/shim-opentracingpackage will be removed in SDK 3.x, planned for approximately September 2026.🚀 Features
PeriodicExportingMetricReader.forceFlushto prevent redundant concurrent export cycles. Concurrent calls to forceFlush will now await any ongoing export and reuse a fresh export cycle if one is started concurrently by another caller. This ensures the latest metrics are always exported efficiently without triggering duplicate collection and export cycles.BatchSpanProcessorconstructor call signature has changed in "sdk-trace". For example, beforenew BatchSpanProcessor(exporter, { maxQueueSize: 1000 }), afternew BatchSpanProcessor({ exporter, maxQueueSize: 1000 }). #6817SimpleSpanProcessorconstructor call signature has changed in "sdk-trace". For example, beforenew SimpleSpanProcessor(exporter), afternew SimpleSpanProcessor({ exporter, selfObsMeterProvider: ... }). #6504🐛 Bug Fixes
uber-trace-id/uberctx-*headers during extract @pichlermarc🏠 Internal
v2.8.0Compare Source
🚀 Features
SpanImpl,Tracer, andBasicTracerProviderviautil.inspectso they render throughdiagandconsole.log#6690 @mcollinahrTimeToSeconds#6449 @anuraaga🐛 Bug Fixes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.